<script>
var ws = new WebSocket("ws://127.0.0.1:1254/2e231fa1a7b347c99349597cde25d7d8"); 
ws.onopen = function(){
   console.log("open");　　
}
ws.onmessage = function(e){
console.log(e.data);
var data;
eval("data="+e.data);
if(data.errorcode==0 && data.direct =="Authorization"){
ws.send("/api/user/Get\n123\n");
}
}
ws.onclose = function(e){
console.log("close");
}
ws.onerror = function(e){　
console.log(error);
}
</script>